# coding:utf-8
__author__ = "Xuhao"

import re


class Tool(object):

    def location_and_capture(self, search_start_str, search_end_str, full_content):
        start_str_location = re.search(search_start_str, full_content)


        if start_str_location is not None:
            start_str_span = start_str_location.span()[1]
        else:
            return None

        end_str_location = re.search(search_end_str, full_content)
        if end_str_location is not None:
            end_str_span = end_str_location.span()[0]
        else:
            return None

        return full_content[start_str_span:end_str_span]


